<template>
    <div class="box">
        
        <!-- <img :src="pdfUrl" alt="" srcset=""> -->
        <!-- <pdf :src="pdfUrl"></pdf> -->
        <h3>大厂全顺机动车检测有限公司收款收据</h3>
        <ul>
            <li>客户名称：{{orderList.userName}}</li>
            <li>支付日期：{{orderList.payTime | dateStyle}}</li>
            <li>收费项目：检测费（{{orderList.carType}}）</li>
            <li>
                <span>数量：1</span>
                <span>单价：{{orderList.payAmout}}元</span>
            </li>
            <li>单号：{{orderList.orderNumber}}</li>
        </ul>
        <ul>
            <li>地址：大厂潮白河工业区工业三路68号</li>
            <li>电话：0316-8961818 / 15127683999</li>
            <li>备注：自收费之日起有效期一个月</li>
        </ul>
        <foot :navUrl="url"/>
    </div>
</template>
<script>
import foot from '@/views/footer.vue'
//import pdf from 'vue-pdf'
export default {
    name:'electronicOrder',
    data(){
        return{
            url:'/printDocuments',
            pdfUrl:null, // pdf文件地址
            orderList:[]
        }
    },
    created(){
        console.log(this.$route, '----  编辑状态进入 车辆详情 --------')
        if (this.$route.params.data) {
            this.orderList = this.$route.params.data
        }else{
            this.$router.go(-1)
        }
        
       
    },

    methods:{


    },
    filters:{
        dateStyle(v){
            let date = new Date(v)
            let Y = date.getFullYear()
            let M = date.getMonth()+1
            let D = date.getDate()
            if (M<10) {
                M = '0'+M
            }
            if (D<10) {
                D = '0'+D
            }
            let value = Y+'-'+M+'-'+D
            return value
        }
    },
    components:{
        foot,
        //pdf
    }
}
</script>
<style lang="less" scoped>
    .box{
        h3{
            font-size: 0.5rem;
            text-align: center;
            line-height: 1rem;
        }
        ul{
            box-sizing: border-box;
            width: 80%;
            border-top: 1px dashed #333;
            padding: 0.3rem;
            margin:0 auto;
            li{
                line-height: 0.8rem;
                display: flex;
                justify-content: space-between;
            }
        }
    }
</style>